package com.diapoclic.entitybean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Folder {
  
    private int idFolder;
    private Date dateCreation=new Date();
    private Date dateUpdate=new Date();
    private String nameFolder;
    private int nbDoc;
    private User user=new User();
    private List<Folder> documents=new ArrayList<Folder>();

    

    public Folder() {
    }

    public int getIdFolder() {
            return this.idFolder;
    }

    public void setIdFolder(int idFolder) {
            this.idFolder = idFolder;
    }

    public Date getDateCreation() {
            return this.dateCreation;
    }

    public void setDateCreation(Date dateCreation) {
            this.dateCreation = dateCreation;
    }

    public Date getDateUpdate() {
            return this.dateUpdate;
    }

    public void setDateUpdate(Date dateUpdate) {
            this.dateUpdate = dateUpdate;
    }

    public String getNameFolder() {
            return this.nameFolder;
    }

    public void setNameFolder(String nameFolder) {
            this.nameFolder = nameFolder;
    }

    public int getNbDoc() {
            return this.nbDoc;
    }

    public void setNbDoc(int nbDoc) {
            this.nbDoc = nbDoc;
    }

    public User getUser() {
            return this.user;
    }

    public void setUser(User user) {
            this.user = user;
    }
    
    public List<Folder> getDocuments() {
            return this.documents;
    }

    public void setDocuments(List<Folder> documents) {
            this.documents = documents;
    }
    
    public String toString()
    {
    	String S=new String();
    	S="<br/> id : " +this.idFolder +" <br/> Name : " +this.nameFolder+ "<br/> Nombre de doc : " + this.nbDoc;
    	S+="<br/> id User : " + this.getUser().getIdUser()+"<br/> Date d'ajout : "+ this.getDateCreation().toString();
		S+="<br/> Date de mise a jour : "+ this.getDateUpdate().toString() +"\n";
    	return S ;
    	
    }
    
    public void incrementNbDoc()
    {
    	this.nbDoc ++;
    
    }
    
}

